package com.yjh.server.controller.miniapp;

import com.yjh.pojo.entity.CourtCategory;
import com.yjh.pojo.vo.R;
import com.yjh.server.service.CourtCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/mini/catalog")
public class MiniCatalogController {
    @Autowired
    private CourtCategoryService courtCategoryService;

    @GetMapping("/getCatalog")
    public R<List> getCatalog(){
        List<CourtCategory> list = courtCategoryService.list();

        return R.success(list);
    }
}
